<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>structure - An example input module for log2timeline</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#methods">METHODS</a></li>
</ul>

<hr name="index" />
</div>
<!-- INDEX END -->

<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>structure - An example input module for log2timeline</p>
<p>
</p>
<hr />
<h1><a name="methods">METHODS</a></h1>
<dl>
<dt><strong><a name="new" class="item">new</a></strong></dt>

<dd>
<p>A default constructor for the input module. There are no parameters passed to the constructor, however it defines the behaviour of the module.  That is to say it indicates whether or not this module parses a file or a directory, and it also defines if this is a log file that gets parsed line-by-line or a file that parses all the timestamp objects and returns them all at once.</p>
</dd>
<dt><strong><a name="init" class="item">init</a></strong></dt>

<dd>
<p>A small routine that takes no parameters and is called by the engine before a file is parsed.  This routine takes care of initializing global variables, so that no values are stored from a previous file that got parsed by the module to avoid confusion.</p>
</dd>
<dt><strong><a name="end" class="item">end</a></strong></dt>

<dd>
<p>Similar to the init routine, except this routine is called by the engine when the parsing is completed.  The purpose of this routine is to close all database handles or other handles that got opened by the module itself (excluding the file handle) and to remove any temporary files that might still be present.</p>
</dd>
<dt><strong><a name="get_time" class="item">get_time</a></strong></dt>

<dd>
<p>This is the main routine of the module.  This is the routine that parses the actual file and produces timestamp objects that get returned to the main engine for further processing.  The routine reads the file or directory and extracts timestamps and other needed information to create a timestamp object that then gets returned to the engine, either line-by-line or all in one (as defined in the constructor of the module).</p>
</dd>
<dt><strong><a name="verify" class="item">verify</a></strong></dt>

<dd>
<p>The purpose of this routine is to verify the structure of the file or directory being passed to the module and tell the engine whether not this module is capable of parsing the file in question or not. This routine is therfore very important for the recursive search of the engine, and it is very important to make this routine as compact and optimized as possible to avoid slowing the tool down too much.</p>
</dd>
<dt><strong><a name="get_help" class="item"><code>get_help()</code></a></strong></dt>

<dd>
<p>Returns a string that contains a longer version of the description of the output module, as well as possibly providing some assistance in how the module should be used.</p>
</dd>
<dt><strong><a name="get_version" class="item"><code>get_version()</code></a></strong></dt>

<dd>
<p>Returns the version number of the module.</p>
</dd>
<dt><strong><a name="get_description" class="item"><code>get_description()</code></a></strong></dt>

<dd>
<p>Returns a string that contains a short description of the module. This short description is used when a list of all available modules is printed out.</p>
</dd>
</dl>

</body>

</html>
